package com.acerola.mrpc.protocol;

import lombok.AllArgsConstructor;
import lombok.Data;

import java.io.Serializable;

/**
 * @program: mrpc
 * @description: 消息请求头
 * @author: Acerola
 * @create: 2022-12-10 18:48
 **/
@Data
@AllArgsConstructor
public class Header implements Serializable {
    //1.魔数,3个字节
    private short magic;
    //2.消息版本,1个字节
    private byte version;
    //3.序列化类型,1个字节
    private byte serializeType;
    //4.消息类型,1个字节
    private byte messageType;
    //5,消息序号,8个字节
    private long requestId;
    //6.消息体长度,4个字节
    private int length;
}
